package com.lyf.shop.service.impl;

import java.util.List;

import com.lyf.shop.vo.TradeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lyf.shop.mapper.OrderRecordMapper;
import com.lyf.shop.domain.OrderRecord;
import com.lyf.shop.service.IOrderRecordService;

/**
 * 订单记录Service业务层处理
 * 
 * @author lyf
 * @date 2023-03-22
 */
@Service
public class OrderRecordServiceImpl implements IOrderRecordService 
{
    @Autowired
    private OrderRecordMapper orderRecordMapper;

    /**
     * 查询订单记录
     * 
     * @param orderId 订单记录主键
     * @return 订单记录
     */
    @Override
    public List<OrderRecord> selectOrderRecordById(Long orderId)
    {
        return orderRecordMapper.selectOrderRecordById(orderId);
    }

    /**
     * 查询订单记录列表
     * 
     * @param orderRecord 订单记录
     * @return 订单记录
     */
    @Override
    public List<OrderRecord> selectOrderRecordList(OrderRecord orderRecord)
    {
        return orderRecordMapper.selectOrderRecordList(orderRecord);
    }


    /**
     * 新增订单记录
     * 
     * @param orderRecord 订单记录
     * @return 结果
     */
    @Override
    public int insertOrderRecord(OrderRecord orderRecord)
    {
        return orderRecordMapper.insertOrderRecord(orderRecord);
    }

    /**
     * 修改订单记录
     * 
     * @param orderRecord 订单记录
     * @return 结果
     */
    @Override
    public int updateOrderRecord(OrderRecord orderRecord)
    {
        return orderRecordMapper.updateOrderRecord(orderRecord);
    }

    /**
     * 批量删除订单记录
     * 
     * @param ids 需要删除的订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderRecordByIds(Long[] ids)
    {
        return orderRecordMapper.deleteOrderRecordByIds(ids);
    }

    /**
     * 删除订单记录信息
     * 
     * @param id 订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderRecordById(Long id)
    {
        return orderRecordMapper.deleteOrderRecordById(id);
    }
}
